From bf222a9292c3756530b35dc5a7709f838d5284de Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Mon, 20 Aug 2018 07:52:58 +0200 Subject: [PATCH] renderborder: Pull some locals into the closest scope Especially the bounds graphene_rect_t, which is unused in the non-border-image case. --- gtk/gtkrenderborder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtkrenderborder.c b/gtk/gtkrenderborder.c index f809e0e215..3426ebfca3 100644 --- a/gtk/gtkrenderborder.c +++ b/gtk/gtkrenderborder.c @@ -668,20 +668,20 @@ gtk_css_style_snapshot_border (GtkCssStyle *style, { GtkBorderImage border_image; float border_width[4]; - graphene_rect_t bounds; - cairo_t *cr; border_width[0] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_TOP_WIDTH), 100); border_width[1] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH), 100); border_width[2] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH), 100); border_width[3] = _gtk_css_number_value_get (gtk_css_style_get_value (style, GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH), 100); - graphene_rect_init (&bounds, 0, 0, width, height); - if (gtk_border_image_init (&border_image, style)) { + cairo_t *cr; + graphene_rect_t bounds; double double_width[4] = { border_width[0], border_width[1], border_width[2], border_width[3] }; + graphene_rect_init (&bounds, 0, 0, width, height); + gtk_snapshot_push_debug (snapshot, "CSS border image"); cr = gtk_snapshot_append_cairo (snapshot, &bounds); -- 2.30.2